library calendar;

import 'package:top_foundation/top_foundation.dart';

export './state.dart';
export './controller.dart';
export './view.dart';

typedef CalendarResult = Function(DateTime? start, DateTime? end);
showCalendar({
  bool isRange = false,
  required CalendarResult result,
}) {
  // showModalBottomSheet(
  //     context: Get.context!,
  //     builder: (ctx) {
  //       return CalendarView(
  //         isRange: true,
  //       );
  //     });

  Get.to(
    () => CalendarView(
      isRange: isRange,
      result: result,
    ),
    opaque: false,
    transition: Transition.downToUp,
    fullscreenDialog: true,
    duration: const Duration(milliseconds: 200),
  );
}
